public class Xunzhaoshuixianhuashu {
    public static void main(String[] args) {
        for (int num = 100; num <= 1000; num++) {
            if (isNarcissisticNumber(num)) {
                System.out.println(num);
            }
        }
    }

    public static boolean isNarcissisticNumber(int num) {
        int originalNum = num;
        int sum = 0;
        while (num > 0) {
            int digit = num % 10;
            sum += Math.pow(digit, 3);
            num /= 10;
        }
        return sum == originalNum;
    }
}

